﻿@namespace Masa.Blazor
@inherits BDomComponentBase

<CascadingValue Value="this" IsFixed="true">
    <CascadingValue Value="IsDark" Name="IsDark">
        <div class="@CssProvider.GetClass()"
             style="@CssProvider.GetStyle()"
             id="@Id"
             @ref="@Ref">
            @TopContent

            @if (WrapperContent != null)
            {
                @WrapperContent
            }
            else
            {
                <div class="@CssProvider.GetClass("wrapper")"
                     style="@CssProvider.GetStyle("wrapper")"
                     @onscroll="HandleOnScrollAsync"
                     @ref="@WrapperElement">
                    <table class="@CssProvider.GetClass("table")"
                           style="@CssProvider.GetStyle("table")">
                        @ChildContent
                    </table>
                </div>
            }

            @BottomContent
        </div>
    </CascadingValue>
</CascadingValue>
